import { Order, ResPage } from "@/api/interface/index";
import httpss from "@/api/http";

//获取订单数据列表
export const OrderList = (parmas: Order.OrderName) => {
  console.log("订单数据", parmas);
  return httpss.post<ResPage<Order.OrderName>>(`/order/list`, parmas);
};

//导出订单数据表
export const OrderExport = () => {
  return httpss.get(`/order/download`, { responseType: "blob" });
};

//删除订单
export const OrderById = (id: number) => {
  console.log("删除成功", id);
  return httpss.delete(`/order/${id}`);
};

//退款订单
export const OrderRefund = (orderNo: string) => {
  return httpss.put(`/refund/time/${orderNo}`);
};

//发货
export const OrderShip = (orderNo: string) => {
  return httpss.put(`/order/ship/${orderNo}`);
};
